<extend name="Public/base"/>

<block name="body">
    <!-- 标题栏 -->
    <div class="main-title">
        <h2>用户列表</h2>
    </div>
    <div class="clearfix">
        
    </div>
    <!-- 数据列表 -->
    <div class="data-table with-padding">
        <table class="table table-bordered table-striped ">
            <thead>
            <tr>
                <th class="">UID</th>
                <th class="">姓名</th>
                <th class="">用户名称</th>
                <th class="">手机号</th>
                <th class="180w">备注信息</th>
                <!--<th class="">地址信息</th>-->
                <!--<th class="">状态</th>-->
                <th class="">操作</th>
            </tr>
            </thead>
            <tbody>
            <notempty name="list">
                <volist name="list" id="vo">
                    <tr>
                        <td>{$vo.uid}</td>
                        <td><a href="{:U('Admin/User/expandinfo_details',array('uid'=>$vo['uid']))}" >{$vo.uid|get_nickname}</a></td>
                        <td><a href="{:U('Admin/User/expandinfo_details',array('uid'=>$vo['uid']))}" >{$vo.uid|get_username}</a></td>
                        <td>{$vo.mobile}</td>
                        <td>{$vo.condition}</td>
                        <!--<td>{$vo.lat} , {$vo.lng}</td>-->
                        <!--<td>{$vo.status}</td>-->
                        <td>
                                <a href="{:U('bidDoctor',array('uid'=>$vo['uid']))}">关联医生</a>
                                <button onclick="del({$vo.uid})"> 删除</button>

                        </td>
                    </tr>
                </volist>
                <else/>
                <td colspan="9" class="text-center"> aOh! 暂时还没有内容!</td>
            </notempty>
            </tbody>
        </table>
    </div>
    <div class="with-padding">
        {$page}
    </div>
</block>

<block name="script">
    <script src="__STATIC__/thinkbox/jquery.thinkbox.js"></script>

    <script type="text/javascript">
        //搜索功能
        $("#search").click(function () {
            var url = $(this).attr('url');
            var query = $('.search-form').find('input').serialize();
            query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g, '');
            query = query.replace(/^&/g, '');
            if (url.indexOf('?') > 0) {
                url += '&' + query;
            } else {
                url += '?' + query;
            }
            window.location.href = url;
        });
        //回车搜索
        $(".search-input").keyup(function (e) {
            if (e.keyCode === 13) {
                $("#search").click();
                return false;
            }
        });
        function del(id){
            if(confirm('确定要删除吗?') ){
                location.href='{:U("delApplication")}?id='+id;
            }
        }
        //导航高亮
        highlight_subnav("{:U('User/index')}");
    </script>
</block>